/*
 * CostManager.h
 *
 *  Created on: 2013-2-3
 *      Author: Administrator
 */

#ifndef COSTMANAGER_H_
#define COSTMANAGER_H_
#include "../bo/CostType.h"
#include <qwidget.h>
#include <qpushbutton.h>
#include <qcheckbox.h>
#include <qtablewidget.h>
#include <qdialog.h>
#include <qlayout.h>
#include <qdebug.h>
#include <QtSql>
#include "../utile/DAObject.h"
#include "ModifyCost.h"
class CostManager:public QDialog
{
	Q_OBJECT
public:
	CostManager(QWidget *parent = 0);
	virtual ~CostManager();
private slots:
	void slt_addMode();
	void slt_modifyMode();
	void fresh();
	void addOrModify(const int &mode, const int &id,
			const QString &name, const QString &comment, const bool &active);
private:
	QPushButton addButton, modifyButton;
	QTableWidget table;
	QHBoxLayout *topLayout;
	QVBoxLayout *mainLayout;
	CostType costType;
	ModifyCost modifyCost;
	QSqlDatabase db;
//	QSqlQuery query;
};

#endif /* COSTMANAGER_H_ */
